<template>
    <div>home</div>
    <button @click="jumpPage">跳转到设置页面</button>
    <button @click="add">添加</button>
    <button @click="remove">移除</button>
    <div>{{  GUI }}</div>

    <button @click="down">开始下载</button>
    <button @click="pause">暂停</button>
    
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";
import { useGui } from "@store";
const { GUI, addGUI, removeGUI} = useGui();

const router = useRouter()

console.log("是否会变化", GUI)

const jumpPage = () => {
    router.push("/setting/conf")
}

const add = () =>  addGUI(Math.ceil(Math.random() * 1000) )
const remove = () => removeGUI()


const down = () => {
    window.downloadMethodList.manageDown()
}

const pause = () => {
    window.downloadMethodList.pause()
}


</script>